import request from '@/utils/request'

export const articleGetChannlesService = () => {
  return request.get('/my/cate/list')
}

export const articleAddChannlesService = (data) => {
  return request.post('/my/cate/add', data)
}

export const articleRenewChannlesService = (data) => {
  return request.put('/my/cate/info', data)
}

export const articleDeleteChannlesService = (id) => {
  return request.delete('/my/cate/del', {
    params: { id }
  })
}

export const articleGetChannlesListService = (params) => {
  return request.get('/my/article/list', {
    params
  })
}

export const articlePostAddService = (data) => {
  return request.post('/my/article/add', data)
}

export const artGetDetailService = (id) =>
  request.get('my/article/info', { params: { id } })

export const artEditService = (data) => request.put('my/article/info', data)

export const artDelService = (id) =>
  request.delete('my/article/info', { params: { id } })
